﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity.Infrastructure;
using DLM.Domain.Model;

namespace DLM.Data.EF.CodeFirst.Mapping
{
    public class AdminLogMap : EntityTypeConfiguration<AdminLog>
    {
        public AdminLogMap()
        {
            this.HasKey(t => t.LogID);
            this.ToTable("AdminLog");
            this.Property(t => t.LogID).HasColumnName("LogID");
            this.Property(t => t.Action).HasColumnName("Action").IsRequired().HasMaxLength(20);
            this.Property(t => t.ActionDate).HasColumnName("ActionDate");
            this.Property(t => t.ActionSourceIP).HasColumnName("ActionSourceIP").IsUnicode(false).HasMaxLength(20);
            //this.Ignore(t => t.Id);
        }

    }
}
